mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-03-19 09:47:20 +01:00
* ObjectManipulator.cpp (getDeleteMenuState): see #2226 fixed GUI
crash that happened when user tried to delete or cut an object from locked library.
This commit is contained in:
parent
e4b711d178
commit
568e9c9912
@ -1,5 +1,9 @@
|
||||
2011-03-28 vadim <vadim@netcitadel.com>
|
||||
|
||||
* ObjectManipulator.cpp (getDeleteMenuState): see #2226 fixed GUI
|
||||
crash that happened when user tried to delete or cut an object
|
||||
from locked library.
|
||||
|
||||
* RuleOptionsDialog.cpp (loadFWObject): see #2230 the GUI should
|
||||
allow limit-burst values of up to 10000
|
||||
|
||||
|
||||
@ -773,6 +773,8 @@ void ObjectManipulator::contextMenuRequested(const QPoint &pos)
|
||||
|
||||
bool ObjectManipulator::getDeleteMenuState(FWObject *obj)
|
||||
{
|
||||
if (obj->isReadOnly()) return false;
|
||||
|
||||
QString objPath = obj->getPath(true).c_str();
|
||||
bool del_menu_item_state = FWBTree().getDeleteMenuState(objPath);
|
||||
|
||||
|
||||
@ -503,6 +503,8 @@ void ObjectManipulator::deleteObject(FWObject *obj, QUndoCommand* macro)
|
||||
if (object_library->getId() == FWObjectDatabase::STANDARD_LIB_ID)
|
||||
return;
|
||||
|
||||
if (obj->isReadOnly()) return;
|
||||
|
||||
if (obj->getId() == FWObjectDatabase::STANDARD_LIB_ID ||
|
||||
obj->getId() == FWObjectDatabase::DELETED_OBJECTS_ID) return;
|
||||
|
||||
|
||||
@ -300,7 +300,7 @@ void ObjectManipulator::delObj(QUndoCommand* macro)
|
||||
|
||||
if (so2.size()==0) return;
|
||||
|
||||
if (so2.size()>1 || !Library::isA(so2.front()))
|
||||
if (so2.size() > 1 || ! Library::isA(so2.front()))
|
||||
{
|
||||
QApplication::setOverrideCursor( QCursor( Qt::WaitCursor) );
|
||||
ConfirmDeleteObjectDialog * dlg = new ConfirmDeleteObjectDialog(this);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user