mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-07 00:04:17 +05:00
Modification, Transformation. IDs of elements are missing, if selection with rectange is used.
This commit is contained in:
parent
14b22e97a5
commit
2022134281
@ -827,8 +827,10 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
|
|||||||
}
|
}
|
||||||
|
|
||||||
myBusy = true;
|
myBusy = true;
|
||||||
if (myEditCurrentArgument == (QWidget*)LineEditElements)
|
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
|
||||||
LineEditElements->setText(aString);
|
LineEditElements->setText(aString);
|
||||||
|
LineEditElements->repaint();
|
||||||
|
}
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
|
|
||||||
// OK
|
// OK
|
||||||
|
@ -721,6 +721,7 @@ void SMESHGUI_RotationDlg::SelectionIntoArgument()
|
|||||||
myBusy = true;
|
myBusy = true;
|
||||||
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
|
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
|
||||||
LineEditElements->setText(aString);
|
LineEditElements->setText(aString);
|
||||||
|
LineEditElements->repaint();
|
||||||
setNewMeshName();
|
setNewMeshName();
|
||||||
}
|
}
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
|
@ -788,6 +788,7 @@ void SMESHGUI_SymmetryDlg::SelectionIntoArgument()
|
|||||||
myBusy = true;
|
myBusy = true;
|
||||||
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
|
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
|
||||||
LineEditElements->setText(aString);
|
LineEditElements->setText(aString);
|
||||||
|
LineEditElements->repaint();
|
||||||
setNewMeshName();
|
setNewMeshName();
|
||||||
}
|
}
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
|
@ -82,6 +82,23 @@ using namespace std;
|
|||||||
|
|
||||||
enum { MOVE_ELEMS_BUTTON = 0, COPY_ELEMS_BUTTON, MAKE_MESH_BUTTON }; //!< action type
|
enum { MOVE_ELEMS_BUTTON = 0, COPY_ELEMS_BUTTON, MAKE_MESH_BUTTON }; //!< action type
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class BusyLocker
|
||||||
|
\brief Simple 'busy state' flag locker.
|
||||||
|
\internal
|
||||||
|
*/
|
||||||
|
|
||||||
|
class BusyLocker
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
//! Constructor. Sets passed boolean flag to \c true.
|
||||||
|
BusyLocker( bool& busy ) : myBusy( busy ) { myBusy = true; }
|
||||||
|
//! Destructor. Clear external boolean flag passed as parameter to the constructor to \c false.
|
||||||
|
~BusyLocker() { myBusy = false; }
|
||||||
|
private:
|
||||||
|
bool& myBusy; //! External 'busy state' boolean flag
|
||||||
|
};
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : SMESHGUI_TranslationDlg()
|
// class : SMESHGUI_TranslationDlg()
|
||||||
// purpose :
|
// purpose :
|
||||||
@ -452,8 +469,9 @@ void SMESHGUI_TranslationDlg::ConstructorsClicked (int constructorId)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_TranslationDlg::ClickOnApply()
|
void SMESHGUI_TranslationDlg::ClickOnApply()
|
||||||
{
|
{
|
||||||
if (mySMESHGUI->isActiveStudyLocked())
|
if (mySMESHGUI->isActiveStudyLocked() || myBusy )
|
||||||
return;
|
return;
|
||||||
|
BusyLocker lock( myBusy );
|
||||||
|
|
||||||
if (myNbOkElements) {
|
if (myNbOkElements) {
|
||||||
QStringList aListElementsId = QStringList::split(" ", myElementsId, false);
|
QStringList aListElementsId = QStringList::split(" ", myElementsId, false);
|
||||||
@ -568,7 +586,7 @@ void SMESHGUI_TranslationDlg::onTextChange (const QString& theNewText)
|
|||||||
QLineEdit* send = (QLineEdit*)sender();
|
QLineEdit* send = (QLineEdit*)sender();
|
||||||
|
|
||||||
if (myBusy) return;
|
if (myBusy) return;
|
||||||
myBusy = true;
|
BusyLocker lock( myBusy );
|
||||||
|
|
||||||
if (send == LineEditElements)
|
if (send == LineEditElements)
|
||||||
myNbOkElements = 0;
|
myNbOkElements = 0;
|
||||||
@ -607,9 +625,8 @@ void SMESHGUI_TranslationDlg::onTextChange (const QString& theNewText)
|
|||||||
if (myNbOkElements) {
|
if (myNbOkElements) {
|
||||||
buttonOk->setEnabled(true);
|
buttonOk->setEnabled(true);
|
||||||
buttonApply->setEnabled(true);
|
buttonApply->setEnabled(true);
|
||||||
}
|
|
||||||
|
|
||||||
myBusy = false;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -618,20 +635,20 @@ void SMESHGUI_TranslationDlg::onTextChange (const QString& theNewText)
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_TranslationDlg::SelectionIntoArgument()
|
void SMESHGUI_TranslationDlg::SelectionIntoArgument()
|
||||||
{
|
{
|
||||||
if (myBusy) return;
|
if (myBusy)
|
||||||
|
return;
|
||||||
|
BusyLocker lock( myBusy );
|
||||||
|
|
||||||
// clear
|
// clear
|
||||||
myActor = 0;
|
myActor = 0;
|
||||||
QString aString = "";
|
QString aString = "";
|
||||||
|
|
||||||
myBusy = true;
|
|
||||||
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
|
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
|
||||||
LineEditElements->setText(aString);
|
LineEditElements->setText(aString);
|
||||||
myNbOkElements = 0;
|
myNbOkElements = 0;
|
||||||
buttonOk->setEnabled(false);
|
buttonOk->setEnabled(false);
|
||||||
buttonApply->setEnabled(false);
|
buttonApply->setEnabled(false);
|
||||||
}
|
}
|
||||||
myBusy = false;
|
|
||||||
|
|
||||||
if (!GroupButtons->isEnabled()) // inactive
|
if (!GroupButtons->isEnabled()) // inactive
|
||||||
return;
|
return;
|
||||||
@ -748,12 +765,11 @@ void SMESHGUI_TranslationDlg::SelectionIntoArgument()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
myBusy = true;
|
|
||||||
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
|
if (myEditCurrentArgument == (QWidget*)LineEditElements) {
|
||||||
LineEditElements->setText(aString);
|
LineEditElements->setText(aString);
|
||||||
|
LineEditElements->repaint();
|
||||||
setNewMeshName();
|
setNewMeshName();
|
||||||
}
|
}
|
||||||
myBusy = false;
|
|
||||||
|
|
||||||
// OK
|
// OK
|
||||||
if (myNbOkElements) {
|
if (myNbOkElements) {
|
||||||
@ -768,6 +784,9 @@ void SMESHGUI_TranslationDlg::SelectionIntoArgument()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_TranslationDlg::SetEditCurrentArgument()
|
void SMESHGUI_TranslationDlg::SetEditCurrentArgument()
|
||||||
{
|
{
|
||||||
|
if (myBusy) return;
|
||||||
|
BusyLocker lock( myBusy );
|
||||||
|
|
||||||
QPushButton* send = (QPushButton*)sender();
|
QPushButton* send = (QPushButton*)sender();
|
||||||
|
|
||||||
disconnect(mySelectionMgr, 0, this, 0);
|
disconnect(mySelectionMgr, 0, this, 0);
|
||||||
@ -837,7 +856,7 @@ void SMESHGUI_TranslationDlg::ActivateThisDialog()
|
|||||||
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
|
||||||
aViewWindow->SetSelectionMode( CellSelection );
|
aViewWindow->SetSelectionMode( CellSelection );
|
||||||
|
|
||||||
SelectionIntoArgument();
|
// SelectionIntoArgument();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user