Skip to content

Commit

Permalink
Fixed library paths for user libs when component is dragged from Comp…
Browse files Browse the repository at this point in the history
…onentsTree
  • Loading branch information
ra3xdh authored and guitorri committed Jul 4, 2015
1 parent d5974ca commit 847bb80
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions qucs/qucs-lib/qucslib_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define _QUCSLIB_COMMON_H_

#include <QFile>
#include <QFileInfo>
#include <QTextStream>
#include <QDebug>

Expand Down Expand Up @@ -190,6 +191,10 @@ inline int makeModelString (QString libname, QString compname, QString compstrin
}

// construct the library model string
QString full_userlib = QucsSettings.QucsHomeDir.canonicalPath() // check is it user library or not ?
+QDir::convertSeparators ("/user_lib/")+libname;
QFileInfo inf(full_userlib+".lib");
if (inf.exists()) libname = full_userlib;
modelstring = "<Lib " + Prefix + " 1 0 0 " +
QString::number(Text_x) + " " +
QString::number(Text_y) + " 0 0 \"" +
Expand Down

0 comments on commit 847bb80

Please sign in to comment.