Gui: fix several compiler warnings
This commit is contained in:
@@ -450,7 +450,7 @@ public:
|
||||
}
|
||||
|
||||
// check to see if this is a valid path
|
||||
if (idx < 0 || idx >= paths.size()) {
|
||||
if (idx < 0 || idx >= static_cast<int>(paths.size())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -523,12 +523,13 @@ public:
|
||||
if (parentInfo.doc < 0) {
|
||||
// need special casing to properly identify this model's object
|
||||
const auto& docs = App::GetApplication().getDocuments();
|
||||
auto docsSize = static_cast<int>(docs.size()*2);
|
||||
|
||||
info.doc = element.row();
|
||||
|
||||
// if my element is a contextual descendant of root (current doc object list, current object prop list)
|
||||
// mark it as such
|
||||
if (element.row() >= docs.size()*2) {
|
||||
if (element.row() >= docsSize) {
|
||||
info.contextualHierarchy = 1;
|
||||
}
|
||||
} else if (parentInfo.contextualHierarchy) {
|
||||
@@ -537,9 +538,9 @@ public:
|
||||
auto cdoc = App::GetApplication().getDocument(currentDoc.c_str());
|
||||
|
||||
if (cdoc) {
|
||||
auto objsSize = cdoc->getObjects().size()*2;
|
||||
auto objsSize = static_cast<int>(cdoc->getObjects().size()*2);
|
||||
int idx = parentInfo.doc - docs.size();
|
||||
if (idx < cdoc->getObjects().size()*2) {
|
||||
if (idx < objsSize) {
|
||||
// |-- Parent (OBJECT) - (row 4, [-1,-1,-1,0]) = encode as element => [parent.row,-1,-1,1]
|
||||
// |- element (PROP) - (row 0, [parent.row,-1,-1,1]) = encode as element => [parent.row,-1,parent.row,1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user