From 90d5362fb1602045bea92b9154bc9cca24e28bbe Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 13 Dec 2016 15:32:47 +0300 Subject: [PATCH] Fix member names confusion --- .../CollectionPlugin_WidgetField.cpp | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp b/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp index ceab82f12..de74d3c46 100644 --- a/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp +++ b/src/CollectionPlugin/CollectionPlugin_WidgetField.cpp @@ -116,7 +116,7 @@ CollectionPlugin_WidgetField:: ModuleBase_IWorkshop* theWorkshop, const Config_WidgetAPI* theData): ModuleBase_WidgetSelector(theParent, theWorkshop, theData), myHeaderEditor(0), - myIsEditing(false), myActivation(false) + myIsTabEdit(false), myActivation(false) { QVBoxLayout* aMainLayout = new QVBoxLayout(this); @@ -284,6 +284,13 @@ void CollectionPlugin_WidgetField::deactivate() storeValueCustom(); } +//********************************************************************************** +//void CollectionPlugin_WidgetField::showEvent(QShowEvent* theEvent) +//{ +// myShapeTypeCombo->setEnabled(!isEditingMode()); +// myFieldTypeCombo->setEnabled(!isEditingMode()); +// myNbComponentsSpn->setEnabled(!isEditingMode()); +//} //********************************************************************************** bool CollectionPlugin_WidgetField::eventFilter(QObject* theObject, QEvent* theEvent) @@ -794,6 +801,9 @@ bool CollectionPlugin_WidgetField:: //********************************************************************************** void CollectionPlugin_WidgetField::onSelectionChanged() { + //if (isEditingMode()) + // return; + if (myActivation) { myActivation = false; return; @@ -952,8 +962,8 @@ void CollectionPlugin_WidgetField::onShapeTypeChanged(int theType) //********************************************************************************** bool CollectionPlugin_WidgetField::processEnter() { - if (myIsEditing) { - myIsEditing = false; + if (myIsTabEdit) { + myIsTabEdit = false; return true; } return false; @@ -962,8 +972,8 @@ bool CollectionPlugin_WidgetField::processEnter() //********************************************************************************** void CollectionPlugin_WidgetField::onFocusChanged(QWidget* theOld, QWidget* theNew) { - if (theNew && (!myIsEditing)) - myIsEditing = dynamic_cast(theNew); + if (theNew && (!myIsTabEdit)) + myIsTabEdit = dynamic_cast(theNew); } //********************************************************************************** -- 2.39.2